 /*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.ronsicecream.pos.entities;

import com.buanalintas.bynga.entities.MasterUnit;
import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author user
 */
@Entity
@Table(name = "pos_master_regional")
@XmlRootElement
//@NamedQueries({
//    @NamedQuery(name = "PosMasterRegional.findAll", query = "SELECT p FROM PosMasterRegional p"),
//    @NamedQuery(name = "PosMasterRegional.findBySync", query = "SELECT p FROM PosMasterRegional p WHERE p.sync = :sync"),
//    @NamedQuery(name = "PosMasterRegional.findByRegionalId", query = "SELECT p FROM PosMasterRegional p WHERE p.regionalId = :regionalId"),
//    @NamedQuery(name = "PosMasterRegional.findByRegionalCode", query = "SELECT p FROM PosMasterRegional p WHERE p.regionalCode = :regionalCode"),
//    @NamedQuery(name = "PosMasterRegional.findByRegionalName", query = "SELECT p FROM PosMasterRegional p WHERE p.regionalName = :regionalName")})
public class PosMasterRegional implements Serializable {
    private static final long serialVersionUID = 1L;
    @Column(name = "sync")
    private String sync;
    @Id
    @Basic(optional = false)
    @Column(name = "regional_id")
    private Integer regionalId;
    @Column(name = "regional_name")
    private String regionalName;
   
    public PosMasterRegional() {
    }

    public PosMasterRegional(Integer regionalId) {
        this.regionalId = regionalId;
    }

    public String getSync() {
        return sync;
    }

    public void setSync(String sync) {
        this.sync = sync;
    }

    public Integer getRegionalId() {
        return regionalId;
    }

    public void setRegionalId(Integer regionalId) {
        this.regionalId = regionalId;
    }

    public String getRegionalName() {
        return regionalName;
    }

    public void setRegionalName(String regionalName) {
        this.regionalName = regionalName;
    }


    @Override
    public int hashCode() {
        int hash = 0;
        hash += (regionalId != null ? regionalId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof PosMasterRegional)) {
            return false;
        }
        PosMasterRegional other = (PosMasterRegional) object;
        if ((this.regionalId == null && other.regionalId != null) || (this.regionalId != null && !this.regionalId.equals(other.regionalId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return  regionalName;
//        return "com.buanalintas.ronsicecream.pos.entities.PosMasterRegional[ regionalId=" + regionalId + " ]";
    }
    
}
